﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace JobDemo01.Job
{
    interface IIndexer
    {
        int Index { get; }

        void Next();
    }

    class Indexer : IIndexer
    {

        public int Index { get; private set; }

        public void Next()
        {
            Index += 1;
        }
    }

    class ListIndexer(List<int> indices) : IIndexer
    {
        int i;

        public int Index => indices[i];

        public void Next()
        {
            i += 1;
        }
    }
}
